package vn.edu.saigontech.ncms.service;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import vn.edu.saigontech.ncms.model.info.Offering;
import vn.edu.saigontech.ncms.model.info.OfferingMember;
import vn.edu.saigontech.ncms.model.info.Receipt;
import vn.edu.saigontech.ncms.model.info.Student;
import vn.edu.saigontech.ncms.model.program.Level;
import vn.edu.saigontech.ncms.model.system.Money;
import vn.edu.saigontech.ncms.service.impl.ReceiptServiceImpl;

public interface ReceiptService extends GenericService<Receipt, Long> {
	
	static final ReceiptService INSTANCE = new ReceiptServiceImpl();
	
	Collection<Receipt> find(String studentFirstName, String studentLastName, Date studentDateOfBirth, String number, Date date, Date fromDate, Date toDate, String offeringName, Money fee, Long cashierId, String comment);
	
	Collection<Receipt> findByDate(Date fromDate, Date toDate);
	
	List<Receipt> findByDateAsc(Date fromDate, Date toDate);
	
	Collection<Receipt> findByStudentId(Long studentId);
	
	Collection<Receipt> findByOfferingId(Long offeringId);
	
	int countByUserId(Long userId);
	
	Collection<Receipt> findRecently();
	
	Student findStudentByOfferingMemberId(Long memberId);
	
	Level findLevelByOfferingMember(OfferingMember member);
	
	Offering findOfferingByOfferingMember(OfferingMember member);
	
	@Deprecated
	Receipt add(String number, Long studentId, Long offeringId, Date date, Money fee, Long cashierId, String comment);
	
	@Deprecated
	Receipt edit(Long receiptId, String number, Long offeringId, Date date, Money fee, Long cashierId, boolean active, String comment);
	
	Collection<Receipt> findAllRecently();

	Object[] findInfoByMaintenanceId(Long maintenanceId);
}